<style lang="less" scoped>
</style>
<template>
    <Input :value="value" @input="updateNub($event)" type="textarea" :autosize="autosize" :placeholder="placeholder" :maxlength="maxlength" :style="{ width: width }"></Input>
</template>
<script>
    export default {
        name: 'basetextarea',
        props: {
            value: {
                type: String,
                default: ''
            },
            placeholder: {
                type: String,
                default: '请输入内容'
            },
            autosize: {
                type: Object,
                default: () => {
                    return {minRows: 2,maxRows: 5}
                }
            },
            width: {
                default: '80%'
            },
            maxlength: {  //  最大输入长度
                type: Number,
                default: 100
            }
        },
        data () {
            return {
            };
        },
        computed: {

        },
        methods: {
            updateNub (value) {
                this.$emit('input', value)
            }
        },
        components: {
        },
        activated: function () {   //  组件激活时调用
        },
        mounted: function () {
        }
    };
</script>
